import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    name: 'home',
    redirect: 'index',
    component: () => import('../views/home/home.vue'),
    children: [
      {
        path: 'index',
        name: 'index',
        title: 'index',
        component: () => import('../views/home/index.vue')
      }, {
        path: 'recentlyUpdate',
        name: 'recentlyUpdate',
        title: 'recentlyUpdate',
        component: () => import('../views/home/recentlyUpdate.vue')
      }, {
        path: 'ranking',
        name: 'ranking',
        title: 'ranking',
        component: () => import('../views/home/ranking.vue')
      },
    ]
  },{
    path: '/login',
    name: 'login',
    component: () => import('@/views/user/login.vue'),
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
